//
//  GDFCitysDetailsViewController.m
//  GlobalDeliciousFood
//
//  Created by lanou on 16/1/11.
//  Copyright © 2016年 com.mjykj.www. All rights reserved.
//

#import "GDFCitysDetailsViewController.h"

@interface GDFCitysDetailsViewController ()

@end

@implementation GDFCitysDetailsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self requestData];
}
- (void)requestData{
    NSString *s = @"韩国";
    NSString *ns = [s stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
    NSString *str = @"http://www.youyuwei.com/api/country?ywsdk_ver=20131018&app_code=com.youyuwei.yuwei.ios&oauth_timestamp=1452524092&oauth_version=1.0&oauth_nonce=f61d123f27f82507e4820b90cc695f6e&oauth_signature=kJ%2Fp3EDoVKxSAumy%2BnRWnhZxo7Y%3D&sys_ver=9.1&name=%E5%8D%A1%E5%A1%94%E5%B0%94%E5%9B%BD&hardware_model=iPhone6%2C2&oauth_consumer_key=4&device_token=&ver=3&list=city&oauth_signature_method=HMAC-SHA1&debug=0&app_ver=2.3&x_auth_mode=client_auth&oauth_token=0_9837387abc30183c39&channel_id=App%20Store&start=0&open_udid=d94c7d552dd251ed097e4bc6be4c09ca68ea2415&device_type=ios&idfa=6C7104BC-CEC8-4DD0-A6AD-54FC76011DB7";
    NSMutableDictionary *dic = [NSMutableDictionary dictionary];
    dic[@"oauth_timestamp"] = @"1452524092";
    dic[@"name"] = @"%E5%8D%A1%E5%A1%94%E5%B0%94%E5%9B%BD";
    //dic[@"oauth_nonce"] = @"f61d123f27f82507e4820b90cc695f6e";
    dic[@"app_code"] = @"com.youyuwei.yuwei.ios";
    dic[@"oauth_version"] = @"1.0";
    dic[@"sys_ver"] = @"9.1";
   NSDictionary *d = [SignatrueEncryption encryptedParamsWithBaseParams:dic];
    NSLog(@"d = %@",d[@"sign"]);
  
    
    [GDFRequestManager requestWithUrl:str parmDic:nil method:GET1 succeedWithData:^(NSData *data) {
        NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:(NSJSONReadingMutableContainers) error:nil];
    } failedWithError:^(NSError *connectionError) {
        
    }];
    
    
    
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
